Hi All,
void getPlfm(Module m)
{
int numEle = noElems (currentPlfm)
AttrType at = find(current Module,"platform")
if(!null at && at.type == attrEnumeration)
{
string szStrings[at.size]
int i = 0
for (i = 0; i < at.size; i++)
szStrings[i] = at.strings[i]
insert (currentPlfm,numEle,(szStrings[i]))
numEle++
}
else
{
errorBox ("Attribute >"plat_attr"<is not an enumeration!")
}
insertColumn(currentPlfm,0,"Platform List",200,iconNone)
}
mwilliamson - Tue Sep 15 07:23:21 EDT 2009 |
Re: Populating ListView with type enumeration values |
Re: Populating ListView with type enumeration values
Given that the array you create has a local scope inside the if statement, why are you even using the array? Or is this just example code? When I do this I just do:
for(i = 0; i < at.size; i++) {
insert(list_DBE, i, at.strings[i]);
}
|
Re: Populating ListView with type enumeration values dpechacek - Tue Sep 15 07:54:26 EDT 2009
Given that the array you create has a local scope inside the if statement, why are you even using the array? Or is this just example code? When I do this I just do:
for(i = 0; i < at.size; i++) {
insert(list_DBE, i, at.strings[i]);
}
Thanks for the response. This was a snippet of example code. It was the curly brackets round the for loop that I was missing. Kicking myself now as have been experimenting with this for hours!!! Thanks Mark |